module Palindromic

let isPalindromic n =
  let nlist = n |> string |> Seq.toList
  nlist = List.rev nlist

let pr n =
  printf "%d: %b\n" n (isPalindromic n)

let data =
  seq {
    for i in 100 .. 999 do
    for j in 100 .. 999 do
      yield (i, j, i * j) }

let main =
  data
  |> Seq.filter (fun (i, j, m) -> isPalindromic m)
  |> Seq.maxBy (fun (i, j, m) -> m)
  |> printf "-- %A\n"
